Skip to main content

Chapter 19

The Runtime Host

"Within the Cube Framework, the Actor is not the system. It is the host in which multiple runtime systems cooperate."


Why This Chapter Exists

By now, the Runtime Pipeline has assembled a complete runtime representation.

Components exist.

Relationships have been established.

Runtime State has been constructed.

The question now becomes:

Where does all of this live?

Within the Cube Framework, the answer is the Runtime Host.

For the Weapon Framework, this responsibility is fulfilled by the Weapon Actor.

However, the Actor should not be viewed as the architecture itself.

It merely hosts the architecture.


The Actor Is Not the Feature

It is common in gameplay programming to treat an Actor as the feature itself.

A weapon Actor becomes "the weapon."

A vehicle Actor becomes "the vehicle."

The Cube Framework deliberately avoids this perspective.

Instead, the Actor represents the environment in which runtime systems cooperate.

It provides lifetime.

World integration.

Replication.

Ownership.

Everything else is delegated to specialized runtime systems.


Hosting Runtime State

The Runtime Host owns the runtime representation.

This includes information such as:

  • Runtime Data.
  • Runtime Components.
  • Runtime Statistics.
  • Build information.
  • Attachment relationships.

These systems together describe the current runtime representation.

The Actor provides access to them.

It does not necessarily create them.


Coordinating Responsibilities

One of the primary responsibilities of the Runtime Host is coordination.

When a Build changes, the Actor delegates reconstruction.

When replicated data changes, the Actor delegates rebuilding.

When runtime construction finishes, the Actor delegates statistic generation.

Rather than implementing every architectural responsibility itself, the Runtime Host coordinates the systems responsible for performing the work.


A Stable Integration Point

Every Cube module requires a place where runtime systems meet.

Gameplay accesses the Actor.

Networking replicates the Actor.

The engine manages the Actor.

The Runtime Host therefore becomes the stable integration point between Unreal Engine and the Cube Framework.

This keeps engine-specific responsibilities separate from framework-specific responsibilities.


Lifetime Ownership

Although runtime systems cooperate, they often share the same lifetime.

When the Runtime Host is created, its runtime systems become available.

When the Runtime Host is destroyed, those runtime systems disappear as well.

The Actor therefore defines the lifetime of the runtime representation without becoming responsible for every individual subsystem.


A Shared Architectural Pattern

The concept of a Runtime Host is not exclusive to the Weapon Framework.

Future Vehicle modules may introduce a Vehicle Actor.

Equipment modules may introduce an Equipment Actor.

Character modules may introduce a Character Actor.

Although these Actors represent different gameplay concepts, they all fulfill the same architectural responsibility.

They host runtime systems.

They do not replace them.


Design Note

When adding new functionality to a Runtime Host, avoid asking:

"Can the Actor perform this work?"

Instead ask:

"Should the Actor host this system, or should it become responsible for it?"

Hosting and owning are different architectural concepts.

Maintaining this distinction keeps Runtime Hosts lightweight as the framework evolves.


Framework Law XIX

Within the Cube Framework, Actors host runtime systems. They should not become those systems.

The Runtime Host provides integration, lifetime and coordination.

The individual runtime systems provide behavior.


Looking Ahead

A Runtime Host coordinates the systems that operate upon a runtime object.

The next chapter explores how those systems obtain the authored knowledge required for runtime construction through the Data Manager.


Revision History

Version 1.0

Initial publication.